
indexModule.controller('modifyPwd',function($scope,$http){
    //修改用户密码
    $scope.savePassword = function(id){
        var pwd = $scope.password;
        var rpwd = $scope.rpwd;
        var reg = /^[0-9a-zA-Z]{6,16}$/;
        if(!reg.test(pwd)){
            return alert(config.pwdVal_isRight);
        }else if(pwd != rpwd){
            return alert(config.pwdVal_isSame);
        }else{
            var postData = {password:pwd};
            postHttp($http,config.usersModify_httpUrl,postData,function(data){
                alert(config.saveHttpMsg);
                window.location.reload();
            });
        }
    };
});
